<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8" />
    <meta content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0" name="viewport" />
    <meta content="yes" name="apple-mobile-web-app-capable" />
    <meta content="black" name="apple-mobile-web-app-status-bar-style" />
    <meta content="telephone=no" name="format-detection" />
    <script type="text/javascript" src="__dotnar_lib_base_url__/js/lib/require.min.js"></script>
	<script type="text/javascript" src="__dotnar_lib_base_url__/js/lib/loader.js"></script>
    <script type="text/javascript" src="/js/require.config.js"></script>
    <script type="text/javascript">
    require(["core"], function() {
        require(["./js/pages/cart"], function(argument) {
            window.removeLoader();
        });
    });
    </script>
    <title></title>
</head>

<body>
    <div style="display:none;" id="jSouperApp" class="_pc">
        {{#include "pages/default/top.html"}}
        <!-- nav-bar -->
        {{#include "./pages/default/nav-bar.html"}}
        <xmp>
            <div class="fcart">
                <!-- {{#teleporter "cart"}} -->
                <div class="ftitle">购物车</div>

                {{#if user.cart_detail.length}}
                <div class="carts">
                    <div>
                        {{#each user.cart_detail}}
                        <div>
                            {{#each goods_info}}
                            <div class="cart">
                                <div class="cart-item goods-img">
                                    <img bind-src="{{goods.preview_img_url}}">
                                </div>

                                <div class="cart-item detail">
                                    <a href="/goods-details.html?id={{goods_id}}">
                                        {{goods.goods_name}}
                                        <p>{{goods.intro}}</p>
                                    </a>
                                </div>

                                <div class="cart-item choice">
                                    <div class="count">
                                        <input event-change="{{'$Top.$Event.cart.update_cart_num'}}" min=1 max="{{max_num}}" value="{{num}}" bind-input="{{'num'}}" type="number" />
                                    </div>
                                </div>

                                <div class="cart-item price">
                                    单价：<span class="price_num">￥{{goods.price}}</span>
                                </div>

                                <div class="cart-item method">
                                    <div event-click="{{'$Top.$Event.cart.remove_goods'}}" class="remove">
                                        <button>移除</button>
                                    </div>
                                </div>
                            </div>
                            {{/each}}
                        </div>
                        {{/each}}
                    </div>
                    <!-- </scroll> -->
                </div>

                <div class="allcount">
                    <div class="box">
                        <div class="price">商品原价总计:
                            <red>￥</red>
                            <span>{{#Fixed $Cache.moni_ach.sou_cash}}</span>
                        </div>
                        <div class="price">优惠:
                            <red>￥</red>
                            <span>{{#Fixed $Cache.moni_ach.sou_cash-$Cache.moni_ach.cash}}</span>
                        </div>
                        <div class="price">运费:
                            <red>￥</red>
                            <span>{{#Fixed $Cache.moni_ach.express_cash}}</span>
                        </div>
                        <div class="price">需付金额:
                            <red>￥</red>
                            <span>{{#Fixed $Cache.moni_ach.finally_cash}}</span>
                        </div>
                        <div class="settlement">
                            <button event-click="{{'$Event.cart.cart_to_ach'}}">确认订单</button>
                        </div>
                    </div>
                </div>

                {{#else}}
                <br/>
                <p>购物车中暂无商品</p>
                {{/if}}
            </div>
        </xmp>
        {{#include './pages/default/bottom.html'}}
    </div>
</body>

</html>
